// --------------------------- 目录结构 start --------------------------------------

fis.set('project.ignore', ['dist/**', 'node_modules/**']);

fis.match('/{modules,components,page}/**.{js,jsx}', {
    isMod: true
});

fis.match('^/{statics}/**.*$', {
    isMod: false,
    useHash: false,
    useSprite: false,
    optimizer: null
});

fis.match('**/*', {
    release: '/ui/static/$0'
});

fis.match('/page(/**/*.html)', {
    useCache: false,
    release: '/ui/$1'
});

fis.match('bower.json', {
    release: false
});

fis.match('*.md', {
    release: false
});

fis.match('fis-conf.js', {
    useCache: false,
    release: false
});

// --------------------------- 目录结构 End --------------------------------------

// --------------------------- 文件类型扩展 Start --------------------------------------
//CSS 预处理器
fis.match('*.less', {
    parser: fis.plugin('less'),
    rExt: '.css'
});

fis.match('*.jsx', {
    parser: fis.plugin('react'),
    rExt: '.js'
});

// 临时模版文件
fis.match('*.tpl', {
    release: false
});

//mock 数据
fis.match('*.html.js', {
    release: false
});
// --------------------------- 文件类型扩展 End --------------------------------------

fis.hook('commonjs');

fis.match('::package', {
    postpackager: fis.plugin('loader', {
        resourceType: 'mod',
        useInlineMap: true,
        allInOne: true
    })
});

fis.match('::package', {
    packager: fis.plugin('map', {
        'pkg/framework.js': [
            'statics/jquery/jquery.js',
            'statics/bootstrap/js/bootstrap.min.js',
            'statics/metisMenu/dist/metisMenu.js',
            'statics/mod/mod.js',
            'modules/common/basic/basic.js'
        ],
        'pkg/framework.css': [
            'statics/bootstrap/css/bootstrap.min.css',
            'statics/metisMenu/dist/metisMenu.min.css',
            'statics/font-awesome/css/font-awesome.min.css',
            'modules/common/basic/basic.css'
        ]
    })
});
// --------------------------- 打包 End --------------------------------------
